import random
first,second,third,fourth,sorry=0,0,0,0,0
luckyTicket=input("请输入中奖号码：")
for i in range(10000):
    lotteryTicket=random.sample(range(1,34),8)
    if len(list(set(luckyTicket).intersection(set(lotteryTicket))))==5:
        fourth+=1
        print("四等奖")
    elif len(list(set(luckyTicket).intersection(set(lotteryTicket))))==6:
        third+=1
        print("三等奖")
    elif len(list(set(luckyTicket).intersection(set(lotteryTicket))))==7:
        second += 1
        print("二等奖")
    elif len(list(set(luckyTicket).intersection(set(lotteryTicket))))==8:
        first+=1
        print("一等奖")
    else:
        sorry+=1
print("一等奖{}".format(first))
print("二等奖{}".format(second))
print("三等奖{}".format(third))
print("四等奖{}".format(fourth))
print("未中奖{}".format(sorry))
